package com.zh.singletonmode.services.lazy;

public class SynchronizedLazySingleton {
    private SynchronizedLazySingleton(){}
    private static SynchronizedLazySingleton synchronizedlazySingleton = null;
    public static SynchronizedLazySingleton getInstance(){
        synchronized (SynchronizedLazySingleton.class) {
            if (synchronizedlazySingleton == null) {
                synchronizedlazySingleton = new SynchronizedLazySingleton();
            }
        }
        return synchronizedlazySingleton;
    }
}
